

-- D:\GOA\reslibrary\templete\res\item\item.pad.lua.xsl
gr_module("gm_xinbanchunzhongyun")

cgfwhpanelitemItem = inherit(GmCtrl.ControlBase):name("cgfwhpanelitemItem")

cgfwhpanelitemItem.init = function (self,parent,aid)

	local top = self
	local win = parent.hostWindow
	local fid = aid or "cgfwhpanelitemItem"
	GmCtrl.ControlBase.init(self,parent,fid,true)

	
	self.id = self:get_child("id")
	
	self.list_id = self:get_child("list_id")
	
	self.wh_id = self:get_child("wh_id")
	
	self.name = self:get_child("name")
	
	self.unit = self:get_child("unit")
	
	self.spec = self:get_child("spec")
	
	self.length = self:get_child("length")
	
	self.width = self:get_child("width")
	
	self.thick = self:get_child("thick")
	
	self.origin = self:get_child("origin")
	
	self.quality = self:get_child("quality")
	
	self.color = self:get_child("color")
	
	self.profile_thumb_url = self:get_child("profile_thumb_url")
	
	self.profile_file_url = self:get_child("profile_file_url")
	
	self.cost_price = self:get_child("cost_price")
	
	self.sale_price = self:get_child("sale_price")
	
	self.min_inventory = self:get_child("min_inventory")
	
	self.bom_code = self:get_child("bom_code")
	
	self.color_code = self:get_child("color_code")
	
	self.inventory = self:get_child("inventory")
	
	self.warning_inventory = self:get_child("warning_inventory")
	
	self.max_inventory = self:get_child("max_inventory")
	
	self.freeze_inventory = self:get_child("freeze_inventory")
	
	self.note = self:get_child("note")
	
	self.barcode = self:get_child("barcode")
	
	self.update_time = self:get_child("update_time")
	
	self.inOut_time = self:get_child("inOut_time")
	
	self.create_time = self:get_child("create_time")
	
	self.check_inventory_time = self:get_child("check_inventory_time")
	
	self.photo_data = self:get_child("photo_data")
	
	
	self:set_click(function(self)
		local ttop = top
		top.hostWindow:addNavFrame('__modal__info',nil,function(frame)
			local tttop = ttop
			print('########## $$$$$$$ 0')
			if frame and frame.set_data then
				frame:set_data(tttop.data)
			end
		end)
	end)
	
end


cgfwhpanelitemItem.set_data = function(self,data)
	self.data = data
	for a,b in pairs(data) do
		if data[a] and self[a] and self[a].set_inner_text and self[a].is_init and self[a]:is_init() then
			self[a]:set_inner_text(tostring(data[a]))
		end
	end
end


	